import request from '@/config/axios'

export interface FeDataVO {
  id: string
  name: string
  description: string
}

// 查询示例联系人分页
export const getCmpPage = async (params) => {
  return await request.get({ url: `/magic-api/cmp/page`, params })
}

export const getCmp = async (id) => {
  return await request.get({ url: `/magic-api/cmp/detail?id=` + id })
}

export const getDemo01ContactPage = async (params) => {
  return await request.get({ url: `/magic-api/cmp/page`, params })
}

// 新增示例联系人
export const createDemo01Contact = async (data: FeDataVO) => {
  return await request.post({ url: `/magic-api/cmp/create`, data })
}

// 修改示例联系人
export const updateDemo01Contact = async (data: FeDataVO) => {
  return await request.put({ url: `/magic-api/cmp/update`, data })
}

// 删除示例联系人
export const deleteDemo01Contact = async (id: string) => {
  return await request.delete({ url: `/magic-api/cmp/delete?id=` + id })
}

// 导出示例联系人 Excel
export const exportDemo01Contact = async (params) => {
  return await request.download({ url: `/magic-api/cmp/export-excel`, params })
}
